LIBPATH = -L"/System/Library/Frameworks/OpenGL.framework/Libraries"
FRAMEWORK = -framework GLUT -framework OpenGL
CCFLAGS = -I../lib/ -L../lib/

CC = gcc
LD = ld
LDLIBS = -lm -lGLU -lGL -lpcg

all: texture runtime

texture: texture.c
	$(CC) $(CCFLAGS) $(FRAMEWORK) -o texture texture.c $(LIBPATH) $(LDLIBS) -g -std=c99 -fnested-functions

runtime: runtime.c
	$(CC) -o runtime runtime.c -g -std=c99 -I../usr/local/include -L../usr/local/lib -lpcg

clean:
	rm -f texture
	rm -rf texture.dSYM
	rm -f runtime
	rm -rf runtime.dSYM